<!doctype html>
<html style='font-size:20px !important'>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
<title>主从</title><style type='text/css'>html {overflow-x: initial !important;}:root { --bg-color:#ffffff; --text-color:#333333; --select-text-bg-color:#B5D6FC; --select-text-font-color:auto; --monospace:"Lucida Console",Consolas,"Courier",monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857; overflow-x: hidden; background: inherit; tab-size: 4; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; overflow-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li > figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; image-orientation: from-image; }
button, input, select, textarea { color: inherit; font: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure > table { margin: 0px; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right: 0px; background-color: inherit; }
.CodeMirror-linenumber { user-select: none; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background: inherit; position: relative !important; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background: 0px 0px; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; -webkit-tap-highlight-color: transparent; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child, li > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { break-after: avoid; }
  .typora-export #write::after { height: 0px; }
  .is-mac table { break-inside: avoid; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background: rgb(204, 204, 204); display: block; overflow-x: hidden; }
p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; }
#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p > .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: "."; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; vertical-align: initial; }
a.md-print-anchor { white-space: pre !important; border-width: initial !important; border-style: none !important; border-color: initial !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; background: 0px 0px !important; text-decoration: initial !important; text-shadow: initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; overflow-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none 0s ease 0s; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; margin-top: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; }
.md-diagram-panel > svg { max-width: 100%; }
[lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; }
[lang="mermaid"] .node text { font-size: 1rem; }
table tr th { border-bottom: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
svg[id^="mermaidChart"] { line-height: 1em; }
mark { background: rgb(255, 255, 0); color: rgb(0, 0, 0); }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
mark .md-meta { color: rgb(0, 0, 0); opacity: 0.3 !important; }
@media print {
  .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background: inherit; }
.CodeMirror-scroll { overflow: auto hidden; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right: 1px solid rgb(221, 221, 221); background: inherit; white-space: nowrap; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background: inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background: inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; background: 0px 0px !important; border: none !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-radius: 0px; border-width: 0px; background: 0px 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; overflow-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; }
.CodeMirror-wrap pre { overflow-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right: 30px solid transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background: rgba(255, 255, 0, 0.4); }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


/* TODO blank toc */
:root {
	--bg-color: hsl(0, 0%, 100%);
	--write-bg: hsl(0, 0%, 100%);
	--link-bg: transparent;
	--mark-bg: hsl(0, 100%, 85%);
	--code-bg: hsl(0, 100%, 95%);
	--codeb-bg: hsl(0, 0%, 95%);
	--quota-bg: hsl(0, 0%, 95%);
	--thead-bg: hsl(0, 0%, 90%);
	--tbody-bg: hsl(0, 0%, 96%);

	--title-color: hsl(0, 0%, 5%);
	--text-color: hsl(0, 0%, 20%);
	--mark-color: hsl(0, 0%, 20%);
	--code-color: hsl(0, 0%, 20%);
	--quota-color: hsl(0, 0%, 35%);
	--codeb-color: hsl(0, 0%, 50%);
	--footer-color: hsl(0, 0%, 50%);
	--link-color: hsl(0, 100%, 75%);

	--md-char-color: hsl(0, 100%, 65%);
	--meta-content-color: hsl(0, 0%, 50%);

	--link-hover: hsl(0, 100%, 65%);
	--thead-hover: hsl(0, 0%, 99%);
	--tbody-hover: hsl(0, 0%, 99%);

	--window-border: 1px solid hsl(0, 0%, 95%);
	--base-border: 1px solid hsl(0, 100%, 65%);
	--base-borderl: 4px solid hsl(0, 100%, 65%);
	--base-borderb: 1px dashed hsl(0, 100%, 65%);
	--opt-borderb: 1px dashed hsl(215, 100%, 65%);

	--base-shadow: 0px 8px 16px hsla(0, 0%, 0%, .2);
	--opt-shadow: 0px 8px 16px 1px hsla(0, 0%, 0%, 0.3);
	--img-shadow: var(--opt-shadow);
	--code-shadow: var(--base-shadow);
	--quota-shadow: var(--base-shadow);

	--base-font: "Poppins", -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;

	--title-font: "EB Garamond", Georgia, "Nimbus Roman No9 L", "Noto Serif CJK SC", "Songti SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;

	--em-font: "EB Garamond", Georgia, "Nimbus Roman No9 L", "Noto Serif CJK SC"， "Songti SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;

	--quota-font: "EB Garamond", Baskerville, Georgia, "Liberation Serif", "TW-Kai", "Kaiti SC", STKaiti, "AR PL UKai CN", "AR PL UKai HK", "AR PL UKai TW", "AR PL UKai TW MBE", "AR PL KaitiM GB", KaiTi, KaiTi_GB2312, DFKai-SB, "TW\-Kai", serif;

	--monospace: "Cascadia code", "Sarasa Term SC", Monaco, "Deja Vu Sans Mono", Consolas, "Lucida Console", "Andale Mono", Courier;

	--lishu: "金梅新細隸國際碼";
}

html {
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
	text-rendering: optimizelegibility;
	-webkit-font-smoothing: initial;
}

html,
body,
#write {
	font-family: var(--base-font);
	font-weight: 400;
	font-size: 16px;
	font-size: 1rem;
	line-height: 2rem;
	background: var(--write-bg);
	color: var(--text-color);
}

content {
	background-color: var(--write-bg);
	min-width: 640px;
}

#write {
	max-width: 914px;
	min-height: calc(100vh - 6rem);
	min-width: calc(100vw - 45rem);
	text-align: justify;
}

/* 目录自动编号 */

.md-toc::before {
	content: "目录";
	font-family: var(--base-font);
	font-size: 2rem;
	font-weight: 200;
	text-align: center;
	display: block;
	position: absolute;
	left: -10rem;
	padding: 8rem;
	padding-top: 2rem;
	background: linear-gradient(-40deg, transparent 49.5%, deeppink 49.5%, deeppink 50.5%, transparent 50.5%) 40px;
}

.md-toc {
	font-size: 1.25rem;
	line-height: 1.5rem;
	display: table;
	margin: 4rem auto;
	margin-left: 4rem !important;
	max-width: 75%;
}

.md-toc-content {
	line-height: 2rem;
	left: 4rem;
	top: 1rem;

}

.md-toc-item {
	font-family: var(--base-font);
}

.md-toc-h1 {
	margin-top: 4rem;
	font-weight: 300;
	font-size: 1.2rem;
}

.md-toc-h1 .md-toc-inner {
	margin-left: 2em;
}

.md-toc-h2 {
	margin-left: 2rem;
	font-size: 1.1rem;
}

.md-toc-h2,
.md-toc-h3 {
	margin-top: 1rem;
	font-weight: 200;
}

.md-toc-h2+.md-toc-h3 {
	margin-left: 8rem;
}

.md-toc-h3 {
	display: inline-block;
	font-size: 1rem;
}

.md-toc-h3 .md-toc-inner {
	margin-left: .5rem;
}

.md-toc-h3::first-of-type {
	margin-left: 4rem;
}

.md-toc-h3:after {
	content: " / ";
}

.md-toc-inner {
	color: var(--text-color);
	border: none !important;
}

.md-toc-h1 {
	counter-increment: counter_md-toc-h1;
	counter-reset: counter_md-toc-h2;
}

.md-toc-h1:before {
	content: "第"counter(counter_md-toc-h1, cjk-ideographic)"章";
}

.md-toc-h2 {
	counter-increment: counter_md-toc-h2;
	counter-reset: counter_md-toc-h3;
}

.md-toc-h2::before {
	content: "第"counter(counter_md-toc-h2, cjk-ideographic)"节";
}

.md-toc-h3 {
	counter-increment: counter_md-toc-h3;
	counter-reset: counter_md-toc-h4;
}

.md-toc-h3::before {
	content: counter(counter_md-toc-h3);
}

.md-toc-h1::before,
.md-toc-h2::before,
.md-toc-h3::before {
	display: inline-block;
	color: var(--text-color);
}

.md-toc-h4,
.md-toc-h5,
.md-toc-h6 {
	display: none;
}

/* 内外边距通常让各个浏览器样式的表现位置不同 */
body,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
	margin: 0;
	padding: 0;
}

/* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
	display: block;
}

/* HTML5 媒体文件跟 img 保持一致 */
audio,
canvas,
video {
	display: inline-block;
}

/* 要注意表单元素并不继承父级 font 的问题 */
body,
button,
input,
select,
textarea {
	font: 400 1em/1.75 var(--base-font);
}

button::-moz-focus-inner,
input::-moz-focus-inner {
	padding: 0;
	border: 0;
}

/* 去掉各Table cell 的边距并让其边重合 */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* 去除默认边框 */
fieldset,
img {
	border: 0;
}

/* 标题样式 */
h1,
h2,
h3,
h4,
h5,
h6 {
	color: var(--title-color);
}

/* 使标题下所有的元素显示为标题样式 */
#write h1 *,
#write h2 *,
#write h3 *,
#write h4 *,
#write h5 *,
#write h6 * {
	color: var(--title-color) !important;
	text-decoration: none !important;
	border-bottom: none !important;
}

/* 让每一级标题更加明显，添加标注 */
#write h1 {
	font-size: 3rem;
	margin-top: 6rem;
	margin-bottom: 3rem;
}

#write h1:before,
#write h1:after {
	content: "";
	display: block;
	position: relative;
	width: 50%;
	margin: 1rem auto;
}

#write h1::before {
	top: -1.5rem;
	border-top: var(--opt-borderb);
}

#write h1::after {
	top: 1.5rem;
	border-top: var(--base-borderb);
}

#write h1,
#write h2 {
	font-family: var(--title-font);
	font-weight: 800;
	line-height: 3rem;
	text-align: center;
	text-transform: uppercase;
}

#write h2 {
	font-size: 2rem;
	margin: 4rem auto;
	margin-bottom: 2rem;
}

#write h3 {
	font-size: 1.75rem;
}

#write h4 {
	font-size: 1.5rem;
}

#write h5,
#write h6 {
	font-size: 1.25rem;
}

#write h3,
#write h4,
#write h5,
#write h6 {
	font-family: var(--base-font);
	font-weight: 600;
	margin: 3rem 0;
	margin-bottom: 1.5rem;
}

#write h3::before,
#write h4::before,
#write h5::before,
#write h6::before {
	font-size: .9rem !important;
	vertical-align: bottom;
	margin-right: .5rem;
	padding: 2px;
	border-radius: 5px;
	background: var(--text-color);
	color: var(--write-bg);
}

#write h3::before {
	content: "H3";
}

#write h4::before {
	content: "H4";
}

#write h5::before {
	content: "H5";
}

#write h6::before {
	content: "H6";
}

/* 让所有块级元素保持相同的间距 */

blockquote,
pre.md-fences,
figure>table,
ul,
ol,
#write img {
	margin: 1.5rem auto;
}

p+p {
	margin: 1rem auto;
}

/* 让行内元素的间距保持一致 */

code,
mark,
kbd,
samp,
tt,
var {
	margin: 0 5px;
	padding: 1px 4px;
}

/* 超链接样式 */

a,
ins {
	color: var(--link-color);
	text-decoration: none;
}

#write a {
	border-bottom: var(--base-borderb);
}

#write a:hover {
	border-bottom-color: var(--link-color);
	color: var(--link-hover);
	text-decoration: none;
}

/* em & strong style */

#write strong,
#write em {
	font-family: var(--em-font);
	font-weight: 800 !important;
	color: var(--title-color);
}

#write em {
	text-decoration: underline dotted;
}

/* mark style */

mark {
	color: var(--mark-color);
	border-radius: 5px;
	background-color: var(--mark-bg);
}

/* code style */

/* yaml style */

#write pre.md-meta-block {
	min-height: 30px;
	position: sticky;
	padding: 1.5rem;
	margin-top: -1.5rem;
	margin-bottom: 2rem;
}

/* code & codeblock style */

/* codeblock mac style */
#write pre.md-fences {
	border-top: 2rem solid var(--mark-color);
	padding: 1rem 0.5rem 1rem;
	display: block;
	-webkit-overflow-scrolling: touch;
	box-shadow: var(--code-shadow);
}

pre.md-fences:before {
	content: ' ';
	background: #fc625d;
	box-shadow: 23px 0 #fdbc40, 45px 0 #35cd4b;
	border-radius: 50%;
	margin-top: -2.3rem;
	position: absolute;
	left: 15px;
	height: 12px;
	width: 12px;
}

#write pre.md-meta-block,
#write pre.md-fences,
code {
	line-height: 1.5rem;
	font-size: .9rem;
	font-weight: 300;
	border-radius: 5px;
	background-color: var(--codeb-bg);
	color: var(--codeb-color);
}

.cm-s-inner .CodeMirror-cursor {
	border-left: solid var(--link-color) !important;
}

/* code style */
code {
	background-color: var(--code-bg);
	color: var(--code-color);
}

kbd,
samp,
tt,
var {
	font-family: var(--monospace);
}

/* 代码块下的标题颜色过深。修改为浅蓝 */
.cm-s-inner .cm-header,
.cm-s-inner.cm-header {
	color: hsl(215, 100%, 75%);
}

/* 列表样式 */

#write ul {
	margin-left: 1.5rem;
	list-style: disc;
}

#write ol {
	list-style: decimal-leading-zero;
	margin-left: 1.5rem;
}

#write ol ol {
	list-style-type: lower-roman;
}

#write ul ul {
	list-style-type: circle;
}

#write ol ol,
#write ul ul,
#write ul ol,
#write ol ul {
	margin-top: .5rem;
}

#write ul li,
#write ol li,
#write li ul,
#write li ol,
#write ul ul,
#write ol ol {
	margin-left: 1rem;
}

/* todo list */

.md-task-list-item>input {
	margin-left: -1.5rem;
	top: 5px;
}

.md-task-list-item>input::before {
	content: "";
	position: absolute;
	top: -4px;
	left: -4px;
	border-radius: 50%;
	width: 1.3rem;
	height: 1.3rem;
	border: var(--base-border);
	background: #fff;
	-webkit-transition: background-color 200ms ease-in-out;
	transition: background-color 200ms ease-in-out;
}

.md-task-list-item>input::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 2px;
	width: 0.6rem;
	height: 0.3rem;
	border: 2px solid #fff;
	border-top: 0;
	border-right: 0;
	-webkit-transform: rotate(-45deg);
	transform: rotate(-45deg);
	opacity: 0;
	-webkit-transition: opacity 200ms ease-in-out;
	transition: opacity 200ms ease-in-out;
}

.md-task-list-item>input:checked::before {
	background-color: var(--link-color);
	border: none;
}

.md-task-list-item>input:checked::after {
	opacity: 1;
}

.md-task-list-item.task-list-done {
	text-decoration: line-through;
	color: var(--footer-color);
}

/* 块/段落引用 */

blockquote {
	background: var(--quota-bg);
	padding: 1.5rem 2rem;
	font-size: 1.2rem;
	border-radius: 5px;
	box-shadow: var(--quota-shadow);
}

blockquote blockquote {
	padding: 0;
	padding-left: 2rem;
	border-left: var(--base-borderl);
	border-radius: 0;
	box-shadow: none;
}

blockquote,
blockquote p {
	font-family: var(--quota-font);
}

blockquote p {
	color: var(--quota-color);
	line-height: 1.75rem;
}

/* 一致化 horizontal rule */
hr {
	border: none;
	border-bottom: 1px solid var(--link-color);
	margin: 3rem auto;
	height: 1px;
	width: 50%;
}

hr.pb {
	page-break-after: always;
	border-bottom: 1px solid transparent;
}

/* img */

#write img {
	box-shadow: var(--img-shadow);
	border-radius: 5px;
}

/* 使图片去掉阴影 */
img[alt|="no-shadow"] {
	box-shadow: none !important;
}

/* 使图片去掉所有效果 */
img[alt|="normal"] {
	margin: 0 !important;
	box-shadow: none !important;
}


/* 脚注样式 脚注内的文字颜色应当较原字稍淡 */

sup.md-footnote {
	padding: 2px;
	background-color: hsla(0, 100%, 85%);
	color: #555;
	cursor: pointer;
	font-size: .75rem;
}

.footnotes,
.footnotes em,
.footnotes strong {
	color: var(--footer-color);
}

.footnotes a {
	color: hsl(215, 100%, 75%);
}

/* 表格样式 */

figure>table {
	width: 98%;
}

#write table th,
#write table thead th {
	background: var(--thead-bg);
	padding: .5rem 1rem;
}

#write table caption {
	border-bottom: none;
}

#write table td {
	background-color: var(--tbody-bg);
	border: 1px solid var(--thead-bg);
	padding: 0.5rem 1rem;
	color: var(--text-color);
}

#write tr th:hover {
	background-color: var(--thead-hover);
}

#write td:hover {
	background-color: var(--tbody-hover);
}

#write th:hover,
#write td:hover {
	color: var(--link-hover);
}



/* 不同的宽度的设备上的字数统计样式 */
@media screen and (max-width: 600px) {
	#write {
		padding: 2rem 1rem;
	}

	blockquote {
		background: var(--quota-bg);
		margin: 2rem -1rem;
		padding: 2rem;
	}

	blockquote blockquote {
		padding-left: 1rem;
		padding-right: 1rem;
		margin-left: 1px;
	}

	#writte figure {
		position: relative;
		left: -2rem;
		min-width: calc(100% + 4rem);
	}

	#write table {
		width: 100%;
	}

	#write h1 {
		font-size: 2.5rem;
	}

	#write h3:before,
	#write h4:before,
	#write h5:before,
	#write h6:before {
		color: var(--bg-color);
	}
}

@media screen and (max-width: 800px) {
	.md-toc {
		padding: 0;
		margin: 0 !important;
		max-width: 100%;

	}

	.md-toc::before {
		display: block;
		position: relative;
		left: 50%;
		margin-top: 4rem;
		margin-bottom: 0;
		padding: 0;
		background: none;
	}

	.md-toc-content {
		top: 0;
		left: 0;
	}

	.md-toc-inner {
		max-width: 20rem;
	}
}

@media screen and (min-width: 1300px) {
	#write {
		box-shadow: var(--base-shadow);
		border-radius: 5px;
		padding: 4rem 1rem;
	}
}

@media screen and (min-width: 1100px) {

	body,
	#footer-word-count-info,
	body.pin-outline,
	.pin-outline #write,
	.pin-outline #footer-word-count-info,
	.pin-outline footer {
		background: var(--write-bg);
	}


	.typora-node #write {
		min-height: calc(100% - 6rem);
	}


	#write {
		padding: 40px 60px;
		background: var(--write-bg);
		margin: 3rem auto 3rem;
		border: none;
	}

	.pin-outline #write {
		border: 0;
		padding-left: 60px;
		padding-right: 60px;
	}

	footer {
		background-color: transparent;
	}
}

@media screen and (min-width: 1300px) {

	body.pin-outline,
	.pin-outline #write,
	.pin-outline #footer-word-count-info,
	.pin-outline footer,
	#footer-word-count-info {
		background: var(--write-bg);
	}

	.typora-node #write {
		min-height: calc(100% - 6rem);
	}

	.pin-outline #write {
		padding: 40px 60px;
		background: var(--write-bg);
		margin: 3rem auto 3rem;
		border: none;
		border-radius: 5px;
	}

	.pin-outline footer {
		background-color: transparent;
	}

}

@media print {

	/**
	 * needed to prevent extra blank page
	 */
	html,
	body {
		border: none;
		height: 99%;
	}

	#write {
		border-radius: 0px;
		font-weight: 400;
	}

	#write h2,
	#write h3,
	#write h4,
	#write h5,
	#write h6 {
		margin-top: 3rem;
		margin-bottom: 1.5rem;
	}

	#write pre.md-fences,
	blockquote {
		margin: 1rem auto;
	}

	#write h1:before,
	#write h1:after,
	#write blockquote h1:before,
	#write blockquote h1:after {
		border: none;
		height: 0;
	}

	h1:first-of-type {
		page-break-before: avoid;
	}

	h2 {
		margin: 2rem auto;
	}

	#write h3,
	#write h4,
	#write h5,
	#write h6,
	p,
	li,
	td,
	tr {
		font-family: var(--title-font);
	}

	blockquote li {
		font-family: var(--quota-font);
	}

	code,
	mark {
		padding: 2px;
	}

	mark {
		color: var(--text-color);
		background: hsl(60, 100%, 50%);
	}

	blockquote {
		position: relative;
		margin: 2rem auto;
		padding: 1.5rem;
		background: var(--quota-bg);
		border: 0px solid transparent;
		border-radius: 5px;
		border-left: 4px solid hsl(0, 100%, 65%);
	}

	blockquote blockquote {
		border-radius: 0px;
		border: 0px solid transparent;
		border-left: 4px solid hsl(0, 100%, 65%);
	}

	.md-task-list-item>input::before {
		top: -3px;
		left: -2px;
		border-radius: 0;
	}

	#write,
	blockquote,
	img,
	pre {
		box-shadow: none;
	}

	.typora-export * {
		-webkit-print-color-adjust: exact;
	}

}

.MathJax_Display {
	font-size: 0.9rem;
	margin-top: 0.5rem;
	margin-bottom: 0;
}

p.mathjax-block,
.mathjax-block {
	padding-bottom: 0;
}

.mathjax-block>.code-tooltip {
	bottom: 5px;
	box-shadow: none;
}

.md-image>.md-meta {
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}

.md-image>img {
	margin-top: 2px;
}

.md-image>.md-meta:first-of-type:before {
	padding-left: 4px;
}

/* 源代码模式 */

#typora-source {
	background: var(--bg-color);
	color: var(--code-color);
	line-height: 1.5rem;
}

#typora-source pre {
	border-radius: 0px !important;
}

/** ui for windows **/

::-webkit-scrollbar-corner {
	display: none;
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.05);
	background-clip: padding-box;
}

[draggable] {
	cursor: pointer;
}

#md-searchpanel {
	border-bottom: var(--base-borderb);
}

#md-searchpanel .btn {
	border: var(--base-border);
}

#md-notification:before {
	top: 14px;
}

#md-notification {
	background: var(--code-bg);
}

/* 侧边栏 文件概览和大纲列表 */

:root {
	--blur-text-color: hsl(0, 0%, 75%);
	--active-file-bg-color: hsl(0, 0%, 99%);
	/* 文件列表 当前文件激活 背景色*/
	--active-file-text-color: hsl(0, 100%, 75%);
	--active-file-border-color: hsl(0, 100%, 75%);
	/* 树形结构下文件激活边框色 */
	--side-bar-bg-color: hsl(0, 0%, 95%);
	/*文件 大纲 侧边栏 背景色*/
	--item-hover-bg-color: hsl(0, 0%, 90%);
	/* 打开文文件夹、正文菜单、最近使用 hover 效果 */
	--item-hover-text-color: inherit;

	--primary-color: hsl(0, 100%, 75%);
	/* color of primary buttons */
	--primary-btn-border-color: hsl(0, 100%, 75%);
	--primary-btn-text-color: hsl(0, 0%, 100%);

	--select-text-bg-color: hsl(0, 100%, 75%);
	--select-text-font-color: hsl(0, 0%, 100%);
	--active-bg: hsl(0, 0%, 95%);
}

/* 语法标记样式 */

.md-expand .md-meta.md-before,
.md-expand .md-meta.md-after {
	padding-left: 5px;
	padding-right: 5px;
}

/* 侧边栏文档大纲tab标签 激活 */

.info-panel-tab:hover,
.active-tab-outline,
.active-tab-files,
.outline-item:hover {
	color: var(--primary-color);
}

.file-list-item:hover,
.file-node-content:hover {
	background-color: var(--bg-color);
	color: var(--primary-color);
}

/* bugfix */
#outline-content,
#file-library {
	color: var(--text-color);
}

/* 大纲目录自动编号 */

.sidebar-content {

	counter-reset: h1;
}

.outline-h1 {
	counter-increment: h1;
	counter-reset: h2;
}

.outline-h2 {
	counter-increment: h2;
	counter-reset: h3;
}

.outline-h3 {
	counter-increment: h3;
	counter-reset: h4;
}

.outline-h4 {
	counter-increment: h4;
	counter-reset: h5;
}

.outline-h5 {
	counter-increment: h5;
	counter-reset: h6;
}

.outline-h1>.outline-item>.outline-label:before {
	content: "章"counter(h1) " ";
}

.outline-h2>.outline-item>.outline-label:before {
	content: "节"counter(h2) " ";
}

.outline-h3>.outline-item>.outline-label:before {
	content: counter(h3) " ";
}

.outline-h4>.outline-item>.outline-label:before {
	content: counter(h3) "."counter(h4) " ";
}

.outline-h5>.outline-item>.outline-label:before {
	content: counter(h3) "."counter(h4) "."counter(h5) " ";
}

.outline-h6>.outline-item>.outline-label:before {
	counter-increment: h6;
	content: counter(h3) "."counter(h4) "."counter(h5) "."counter(h6) " ";
}

/* 书写区右键菜单 */
/* control-menu */

.context-menu.dropdown-menu>li>a:focus {
	background-color: var(--active-bg);
}

.context-menu.dropdown-menu>.active>a,
.context-menu.dropdown-menu>li>a:hover,
.menu-style-btn.active {
	color: var(--primary-color);
}

/* 一体化模式下菜单页 */

/* 菜单侧标栏 */
.megamenu-menu {
	box-shadow: 2px 2px 5px 0 #33333380, 2px 0px 10px 0 #33333380;
}

/* bugfix */
.megamenu-opened .megamenu-menu {
	left: -1px !important;
}

/* 侧边栏item激活 */
.megamenu-menu-list:not(.saved) li a:hover,
.megamenu-menu-list li a.active {
	background-color: var(--active-bg);
	color: var(--primary-color);
	display: block !important;
}

/* bugfix */
.megamenu-menu-list li {
	line-height: 48px;
}

.megamenu-menu-list li a {
	height: 48px;
}

a.menu-style-btn:hover {
	background: var(--active-bg);
}

.megamenu-content {
	background: var(--bg-color);
}

/* 标题 */

.megamenu-menu-panel h1,
.megamenu-menu-panel h2 {
	margin: 2rem auto 3rem;
}

/* 长形按钮 */
.long-btn:hover {
	color: var(--primary-color) !important;
}

.megamenu-menu-panel .btn {
	border: var(--base-border);
}

/* 最近文档 */

.megamenu-menu-panel table tr {
	background: hsl(0, 0%, 99%);
}

#recent-file-panel tbody tr:nth-child(2n-1) {
	background-color: hsl(0, 0%, 95%);
}

.megamenu-menu-panel tr:hover,
.megamenu-menu-panel th:hover,
.megamenu-menu-panel td:hover {
	color: var(--primary-color) !important;
}

/* 主题页 */
/* 样式预览 */

.theme-preview-div:hover {
	border-color: #80aaff80;
}

.theme-preview-div {
	border: 4px solid #99999950;
}

.theme-preview-div.active,
.theme-preview-div.active:hover {
	border-color: var(--primary-color);
}

/* 偏好设定 */

.unibody-window {
	font-family: var(--base-font);
}

/* 偏好设定侧边栏 */
.nav-group-item.active {
	background: var(--item-hover-bg-color) !important;
	color: var(--primary-color);
}

/* 关于页 */
/* fix */
table#typora-help-md-table tr {
	background: transparent;
}

.about-content-meta {
	font-family: var(--title-font);
}


/* titlebar */

#top-titlebar,
#top-titlebar * {
	background-color: var(--bg-color);
}

#top-titlebar {
	height: 28px;
	font-family: var(--base-font);
}

#w-traffic-lights {
	display: flex;
	flex-direction: row;
}

#w-max-group {
	display: contents;
}

/* bugfix */

footer.stopselect.ty-footer {
	right: 0;
}

/* animation */
#write td,
#megamenu-content td,
.file-list-item,
.megamenu-menu li,
.btn,
.long-btn {
	position: relative;
	overflow: hidden;
}

#write td:after,
#megamenu-content td:after,
.file-list-item:after,
.megamenu-menu li:after,
.btn:after,
.long-btn:after {
	content: "";
	display: block;
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	background-image: radial-gradient(circle, #666 10%, transparent 10.01%);
	background-repeat: no-repeat;
	background-position: 50%;
	transform: scale(10, 10);
	opacity: 0;
	transition: transform .3s, opacity .5s;
}

#write td:active:after,
#megamenu-content td:active:after,
.file-list-item:active:after,
.megamenu-menu li:active:after,
.btn:active:after,
.long-btn:active:after {
	transform: scale(0, 0);
	opacity: .3;
	transition: 0s;
}

.md-image>.md-meta {
	color: var(--meta-content-color);
}

.unibody-window {
	font-family: var(--base-font);
}@import "";

:root {
    --bg-color: hsl(0, 0%, 25%);
    --write-bg: hsl(0, 0%, 25%);
    --link-bg: transparent;
    --mark-bg: hsl(100, 100%, 85%);
    --codeb-bg: hsl(200, 19%, 18%);
    --code-bg: hsl(0, 100%, 5%);
    --quota-bg: hsl(0, 0%, 5%);
    --thead-bg: hsl(0, 0%, 10%);
    --tbody-bg: hsl(0, 0%, 4%);
    --text-color: hsl(0, 0%, 80%);
    --title-color: hsl(0, 0%, 95%);
    --link-color: hsl(100, 100%, 75%);
    --mark-color: hsl(0, 0%, 20%);
    --code-color: hsl(0, 0%, 80%);
    --codeb-color: hsl(0, 0%, 50%);
    --quota-color: hsl(0, 0%, 65%);
    --footer-color: hsl(0, 0%, 50%);
    --md-char-color: hsl(100, 100%, 65%);
    --meta-content-color: hsl(0, 0%, 50%);
    --link-hover: hsl(100, 100%, 65%);
    --thead-hover: hsl(0, 0%, 25%);
    --tbody-hover: hsl(0, 0%, 25%);

    --window-border: 1px solid hsl(0, 0%, 5%);
    --base-border: 1px solid hsl(100, 100%, 65%);
    --base-borderl: 4px solid hsl(100, 100%, 65%);
    --base-borderb: 1px dashed hsl(100, 100%, 65%);
    --opt-borderb: 1px dashed hsl(215, 100%, 65%);

    --base-shadow: 0px 20px 40px 1px hsla(0, 0%, 0%, 0.3);
    --img-shadow: 0px 20px 40px 1px hsla(0, 0%, 0%, 0.3);
    --code-shadow: 0px 20px 40px 1px hsla(0, 0%, 0%, 0.3);
    --quota-shadow: 0px 20px 40px 1px hsla(0, 0%, 0%, 0.3);

    --blur-text-color: hsl(100, 100%, 75%);
    --active-file-bg-color: hsl(0, 0%, 1%);
    --active-file-text-color: hsl(100, 100%, 75%);
    --active-file-border-color: hsl(100, 100%, 75%);
    --side-bar-bg-color: hsl(0, 0%, 15%);
    --item-hover-bg-color: hsl(0, 0%, 10%);
    --item-hover-text-color: inherit;

    --primary-color: hsl(100, 100%, 75%);
    --primary-btn-border-color: hsl(100, 100%, 75%);
    --primary-btn-text-color: hsl(0, 0%, 0%);

    --select-text-bg-color: hsl(100, 100%, 75%);
    --select-text-font-color: hsl(0, 0%, 0%);
    --active-bg: hsl(0, 0%, 5%);
}


/* 侧边栏文档大纲tab标签 激活 */

.info-panel-tab:hover {
    color: var(--primary-color);
}

/* 侧边栏文档大纲tab标签 激活 */
.active-tab-outline,
.active-tab-files {
    color: var(--primary-color);
}

.file-list-item:hover {
    background-color: var(--item-hover-bg-color);
    color: var(--primary-color);
}


#top-titlebar,
#top-titlebar * {
    background-color: var(--bg-color);
}

.megamenu-menu-panel table tr {
    background: var(--write-bg);
}

#recent-file-panel tbody tr:nth-child(2n-1) {
    background-color: var(--tbody-bg);
}

.megamenu-menu-panel tr:hover {
    background-color: var(--thead-hover) !important;
    color: var(--primary-color) !important;
}


/* bugfix */
footer.stopselect.ty-footer {
    right: 0;
}

.cm-s-inner {
    background-color: #263238;
    color: rgba(233, 237, 237, 1);
}

.cm-s-inner .CodeMirror-gutters {
    background: #263238;
    color: rgb(83, 127, 126);
    border: none;
}

.cm-s-inner .CodeMirror-guttermarker,
.cm-s-inner .CodeMirror-guttermarker-subtle,
.cm-s-inner .CodeMirror-linenumber {
    color: rgb(83, 127, 126);
}

.cm-s-inner .CodeMirror-cursor {
    border-left: 1px solid #f8f8f0;
}

.cm-s-inner div.CodeMirror-selected {
    background: rgba(255, 255, 255, 0.15);
}

.cm-s-inner.CodeMirror-focused div.CodeMirror-selected {
    background: rgba(255, 255, 255, 0.10);
}

.cm-s-inner .CodeMirror-line::selection,
.cm-s-inner .CodeMirror-line>span::selection,
.cm-s-inner .CodeMirror-line>span>span::selection {
    background: rgba(255, 255, 255, 0.10);
}

.cm-s-inner .CodeMirror-line::-moz-selection,
.cm-s-inner .CodeMirror-line>span::-moz-selection,
.cm-s-inner .CodeMirror-line>span>span::-moz-selection {
    background: rgba(255, 255, 255, 0.10);
}

.cm-s-inner .CodeMirror-activeline-background {
    background: rgba(0, 0, 0, 0);
}

.cm-s-inner .cm-keyword {
    color: rgba(199, 146, 234, 1);
}

.cm-s-inner .cm-operator {
    color: rgba(233, 237, 237, 1);
}

.cm-s-inner .cm-variable-2 {
    color: #80CBC4;
}

.cm-s-inner .cm-variable-3 {
    color: #82B1FF;
}

.cm-s-inner .cm-builtin {
    color: #DECB6B;
}

.cm-s-inner .cm-atom {
    color: #F77669;
}

.cm-s-inner .cm-number {
    color: #F77669;
}

.cm-s-inner .cm-def {
    color: rgba(233, 237, 237, 1);
}

.cm-s-inner .cm-string {
    color: #C3E88D;
}

.cm-s-inner .cm-string-2 {
    color: #80CBC4;
}

.cm-s-inner .cm-comment {
    color: #546E7A;
}

.cm-s-inner .cm-variable {
    color: #82B1FF;
}

.cm-s-inner .cm-tag {
    color: #80CBC4;
}

.cm-s-inner .cm-meta {
    color: #80CBC4;
}

.cm-s-inner .cm-attribute {
    color: #FFCB6B;
}

.cm-s-inner .cm-property {
    color: #80CBAE;
}

.cm-s-inner .cm-qualifier {
    color: #DECB6B;
}

.cm-s-inner .cm-variable-3 {
    color: #DECB6B;
}

.cm-s-inner .cm-tag {
    color: rgba(255, 83, 112, 1);
}

.cm-s-inner .cm-error {
    color: rgba(255, 255, 255, 1.0);
    background-color: #EC5F67;
}

.cm-s-inner .CodeMirror-matchingbracket {
    text-decoration: underline;
    color: white !important;
}

.cm-s-inner .cm-link,
.cm-s-inner.cm-link {
    color: var(--link-color);
}

/**apply to code fences with plan text**/
.md-fences {
    background-color: #263238;
    color: rgba(233, 237, 237, 1);
    border: none;
}

.md-fences .code-tooltip {
    background-color: #263238;
}


</style>
</head>
<body class='typora-export os-windows'>
<div id='write'  class=''><h1><a name="主从" class="md-header-anchor"></a><span>主从</span></h1><p>&nbsp;</p><h3><a name="命令行模式" class="md-header-anchor"></a><strong><span>命令行模式</span></strong></h3><p><span>在从服务器命令行中执行下面的命令即可成为该主服务器的从节点：</span></p><pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang=""><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang=""><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 42px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 38px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style="text-rendering: auto;"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: -38px; width: 38px;"></div><div class="CodeMirror-gutter-wrapper CodeMirror-activeline-gutter" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt CodeMirror-linenumber-show" style="left: 0px; width: 30px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#在从服务器执行下面的命令成为或取消成为某节点的从节点</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#slaveof  主服务器的IP  端口号</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">slaveof  host port</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#取消成为任何服务器的从服务器</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">slaveof no one</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#从服务器只读(推荐配置)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">config set slave-read-only yes</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt CodeMirror-linenumber-show" style="left: 0px; width: 30px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#查看主从信息</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 30px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">info replication</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -38px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt CodeMirror-linenumber-show" style="left: 0px; width: 30px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> </span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 390px;"></div><div class="CodeMirror-gutters" style="height: 390px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 38px;"></div></div></div></div></pre><p><code>slaveof</code><span> 命令是异步的，不会阻塞。</span>
<span>同时，从服务器现有的数据会先被清空，然后才会同步主服务器的数据。</span></p><p>&nbsp;</p><h3><a name="配置文件" class="md-header-anchor"></a><strong><span>配置文件</span></strong></h3><p><span>在从服务器配置文件中添加下面的配置然后重启从服务器即可：</span></p><pre spellcheck="false" class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" lang="she"><div class="CodeMirror cm-s-inner CodeMirror-wrap" lang="she"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 32px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 28px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"><pre><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>6</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-code" role="presentation" style="text-rendering: auto;"><div class="CodeMirror-activeline" style="position: relative;"><div class="CodeMirror-activeline-background CodeMirror-linebackground"></div><div class="CodeMirror-gutter-background CodeMirror-activeline-gutter" style="left: -28px; width: 28px;"></div><div class="CodeMirror-gutter-wrapper CodeMirror-activeline-gutter" style="left: -28px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt CodeMirror-linenumber-show" style="left: 0px; width: 20px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#在从节点配置文件中新增下面两个配置即可指定成为某个主节点的从节点</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -28px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#slaveof 主节点地址 主节点端口</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -28px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">slaveof  host port</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -28px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -28px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">#从服务器只读(推荐配置)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -28px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt CodeMirror-linenumber-show" style="left: 0px; width: 20px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;">slave-read-only yes</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 0px; width: 1px; border-bottom: 0px solid transparent; top: 180px;"></div><div class="CodeMirror-gutters" style="height: 180px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div></pre><p>&nbsp;</p></div>
</body>
</html>